<?php
require_once 'top/TopClient.php';
require_once 'top/RequestCheckUtil.php';
require_once 'top/request/TaobaokeItemsGetRequest.php';

require_once 'top/TopClient.php';
require_once 'top/RequestCheckUtil.php';
require_once 'top/request/ItemGetRequest.php';
//echo __DIR__ .  '/log/index_' . date('Y-m-d') . '.txt';exit;
$c = new TopClient;
$c->appkey = '21170405';
$c->secretKey = 'e7b2c2be477fcd7196e40c1f8b81a0ee';
$req = new ItemGetRequest;
$req->setFields("detail_url,num_iid,title,nick,type,cid,seller_cids,props,input_pids,input_str,desc,pic_url,num,valid_thru,list_time,delist_time,stuff_status,location,price,post_fee,express_fee,ems_fee,has_discount,freight_payer,has_invoice,has_warranty,has_showcase,modified,increment,approve_status,postage_id,product_id,auction_point,property_alias,item_img,prop_img,sku,video,outer_id,is_virtual,item_weight");
$req->setNumIid(13423858875);
$resp = $c->execute($req);
error_log(date('Y-m-d H:i:s') . "\r\n" . $resp . "\r\n", 3, __DIR__ .  '/log/index_' . date('Y-m-d') . '.txt');
echo($resp);
exit;

$nick = 'maculasoft';
$keyword = 'a';
$mallitem = '1';
if ($nick) {
	$c = new TopClient;
	$c->appkey = '21170405';
	$c->secretKey = 'e7b2c2be477fcd7196e40c1f8b81a0ee';
	$req = new TaobaokeItemsGetRequest;
	$req->setFields("num_iid,title,nick,pic_url,price,click_url,commission,commission_rate,commission_num,commission_volume,shop_click_url,seller_credit_score,item_location,volume");
	if ($mallitem == '1')
		$req->setMallItem("true");
	$req->setNick($nick);        //佣金的淘宝帐号
	$req->setKeyword($keyword);
	$resp = $c->execute($req);
	echo($resp);
}
exit;